3.853 \(\int \frac{(c-i c \tan (e+f x))^n (-i (2+n)+(-2+n) \tan (e+f x))}{(-i+\tan (e+f x))^2} \, dx\)

Optimal. Leaf size=33 \[ \frac{(c-i c \tan (e+f x))^n}{f (-\tan (e+f x)+i)^2} \]

[Out]

(c - I*c*Tan[e + f*x])^n/(f*(I - Tan[e + f*x])^2)

________________________________________________________________________________________

Rubi [A]  time = 0.105814, antiderivative size = 33, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 46, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.043, Rules used = {3588, 74} \[ \frac{(c-i c \tan (e+f x))^n}{f (-\tan (e+f x)+i)^2} \]

Antiderivative was successfully verified.

[In]

Int[((c - I*c*Tan[e + f*x])^n*((-I)*(2 + n) + (-2 + n)*Tan[e + f*x]))/(-I + Tan[e + f*x])^2,x]

[Out]

(c - I*c*Tan[e + f*x])^n/(f*(I - Tan[e + f*x])^2)

Rule 3588

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(a*c)/f, Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x
], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]

Rule 74

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*(c + d*x)
^(n + 1)*(e + f*x)^(p + 1))/(d*f*(n + p + 2)), x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2, 0] &
& EqQ[a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)), 0]

Rubi steps

\begin{align*} \int \frac{(c-i c \tan (e+f x))^n (-i (2+n)+(-2+n) \tan (e+f x))}{(-i+\tan (e+f x))^2} \, dx &=-\frac{(i c) \operatorname{Subst}\left (\int \frac{(c-i c x)^{-1+n} (-i (2+n)+(-2+n) x)}{(-i+x)^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{(c-i c \tan (e+f x))^n}{f (i-\tan (e+f x))^2}\\ \end{align*}

Mathematica [A]  time = 3.70189, size = 56, normalized size = 1.7 \[ \frac{(c \sec (e+f x))^n \exp (n (-\log (c \sec (e+f x))+\log (c-i c \tan (e+f x))))}{f (\tan (e+f x)-i)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((c - I*c*Tan[e + f*x])^n*((-I)*(2 + n) + (-2 + n)*Tan[e + f*x]))/(-I + Tan[e + f*x])^2,x]

[Out]

(E^(n*(-Log[c*Sec[e + f*x]] + Log[c - I*c*Tan[e + f*x]]))*(c*Sec[e + f*x])^n)/(f*(-I + Tan[e + f*x])^2)

________________________________________________________________________________________

Maple [F]  time = 0.713, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( c-ic\tan \left ( fx+e \right ) \right ) ^{n} \left ( -i \left ( 2+n \right ) + \left ( n-2 \right ) \tan \left ( fx+e \right ) \right ) }{ \left ( \tan \left ( fx+e \right ) -i \right ) ^{2}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c-I*c*tan(f*x+e))^n*(-I*(2+n)+(n-2)*tan(f*x+e))/(tan(f*x+e)-I)^2,x)

[Out]

int((c-I*c*tan(f*x+e))^n*(-I*(2+n)+(n-2)*tan(f*x+e))/(tan(f*x+e)-I)^2,x)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-I*c*tan(f*x+e))^n*(-I*(2+n)+(-2+n)*tan(f*x+e))/(-I+tan(f*x+e))^2,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [B]  time = 1.37158, size = 153, normalized size = 4.64 \begin{align*} -\frac{\left (\frac{2 \, c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}\right )^{n}{\left (e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{4 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-I*c*tan(f*x+e))^n*(-I*(2+n)+(-2+n)*tan(f*x+e))/(-I+tan(f*x+e))^2,x, algorithm="fricas")

[Out]

-1/4*(2*c/(e^(2*I*f*x + 2*I*e) + 1))^n*(e^(4*I*f*x + 4*I*e) + 2*e^(2*I*f*x + 2*I*e) + 1)*e^(-4*I*f*x - 4*I*e)/
f

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-I*c*tan(f*x+e))**n*(-I*(2+n)+(-2+n)*tan(f*x+e))/(tan(f*x+e)-I)**2,x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left ({\left (n - 2\right )} \tan \left (f x + e\right ) - i \, n - 2 i\right )}{\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{n}}{{\left (\tan \left (f x + e\right ) - i\right )}^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-I*c*tan(f*x+e))^n*(-I*(2+n)+(-2+n)*tan(f*x+e))/(-I+tan(f*x+e))^2,x, algorithm="giac")

[Out]

integrate(((n - 2)*tan(f*x + e) - I*n - 2*I)*(-I*c*tan(f*x + e) + c)^n/(tan(f*x + e) - I)^2, x)